#!/bin/bash

# tee command sends data from STDIN to two destinations at the same time. One
# destination is STDOUT. The other destination is a file name specified on the
# tee command line.

tempfile=testfile
echo "This is the start of the test" | tee $tempfile
echo "This is the second line of the test" | tee -a $tempfile
echo "This is the end of the test" | tee -a $tempfile
cat $tempfile
rm $tempfile

